#!/sbin/openrc-run

depend() {
    need localmount
    need dbus
    need usbguard
    need usb-access-control
}

start() {
    ebegin "Starting usbguard dbus bridge"
    start-stop-daemon --start --background --make-pidfile --pidfile /var/run/usbguard-dbus.pid --exec /usr/sbin/usbguard-dbus -- $APPEND
    eend $?
}

stop() {
    ebegin "Stopping usbguard dbus bridge" 
    start-stop-daemon --stop --background --make-pidfile --pidfile /var/run/usbguard-dbus.pid  --exec /usr/sbin/usbguard-dbus -- $APPEND
    eend $?
}
